<% title t('layouts.application.signin') %>
<div class="subtitle"><%= t('devise.sessions.subtitle') %></div>

<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
  <div class="marginTop">
    <%= react_component 'Input', props: {
      type: 'email',
      name: 'user[email]',
      id: 'user_email',
      label: t('common.form.email'),
      light: true,
      required: true
    } %>

    <div class="smallMarginTop">
      <%= react_component 'Input', props: {
        type: 'password',
        name: 'user[password]',
        id: 'user_password',
        label: t('devise.password'),
        light: true,
        required: true
      } %>
    </div>

    <% if devise_mapping.rememberable? -%>
      <div class="label smallMarginTop">
        <%= react_component 'Input', props: {
          type: 'checkbox',
          name: 'user[remember_me]',
          id: 'user_remember_me',
          label: t('devise.remember_me'),
          value: 1,
          light: true
        } %>
      </div>
    <% end -%>

    <% if @display_recaptcha %>
      <%= recaptcha_tags id: 'recaptcha_form', callback: 'recaptcha_verified', expired_callback: 'recaptcha_expired' %>
    <% end %>

    <%= f.submit t('account.sign_in'), disabled: @display_recaptcha, class: 'recaptcha_submit buttonGhostM marginTop' %>
  </div>
<% end %>

<%= render 'devise/shared/links' %>
